package cc.idoone.joddhttp.demo;

import jodd.http.HttpRequest;

import java.net.SocketException;

/**
 * @author hemj
 * @version 2017/7/31
 */
public class ConnectionProvidertDemo {
    private static final String URL = "http://localhost:8088/joddhttp/test";

    public static void main(String[] args) throws SocketException {
        // ConnectionProvider
        System.out.println(HttpRequest.get(URL)
                .query("uname", "hemj")
                .open(new MyConnectionProvider()).send()
                .charset("UTF-8").bodyText());
    }

}
